import request from '@/utils/request'

export function fetchRegularRuleList(query) {
  return request({
    url: '/integral/dimIntFix/page',
    method: 'get',
    params: query
  })
}

export function fetchBusinessRuleList(query) {
  return request({
    url: '/integral/businessrule/page',
    method: 'get',
    params: query
  })
}

export function fetchRatioList(query) {
  return request({
    url: '/integral/ratio/page',
    method: 'get',
    params: query
  })
}

export function putRegularRuleObj(obj) {
  return request({
    url: '/integral/dimIntFix',
    method: 'put',
    data: obj
  })
}

export function putBusinessRuleObj(obj) {
  return request({
    url: '/integral/businessrule',
    method: 'put',
    data: obj
  })
}

export function putRatioObj(obj) {
  return request({
    url: '/integral/ratio/putAndMaintain',
    method: 'put',
    data: obj
  })
}

export function fetchRegularRuleListNew(query) {
  return request({
    url: '/integral/dimIntFix/pageHistory',
    method: 'get',
    params: query
  })
}

export function fetchBusinessRuleListNew(query) {
  return request({
    url: '/integral/businessrule/pageHistory',
    method: 'get',
    params: query
  })
}

export function getStop(id) {
  return request({
    url: '/integral/dimIntFix/getStop/' + id,
    method: 'get'
  })
}

export function getUse(id) {
  return request({
    url: '/integral/dimIntFix/getUse/' + id,
    method: 'get'
  })
}

export function getStopNew(id) {
  return request({
    url: '/integral/businessrule/getStop/' + id,
    method: 'get'
  })
}

export function getUseNew(id) {
  return request({
    url: '/integral/businessrule/getUse/' + id,
    method: 'get'
  })
}

export function fetchRegularRuleList1(query) {
  return request({
    url: '/admin/user/pageFix',
    method: 'get',
    params: query
  })
}

export function fetchBusinessRuleList1(query) {
  return request({
    url: '/admin/user/pageBus',
    method: 'get',
    params: query
  })
}

export function fetchRatioList1(query) {
  return request({
    url: '/admin/user/pageRat',
    method: 'get',
    params: query
  })
}

export function putRegularRuleObj1(obj) {
  return request({
    url: '/admin/user/updateFix',
    method: 'get',
    params: obj
  })
}

export function putBusinessRuleObj1(obj) {
  return request({
    url: '/admin/user/updateDimBus',
    method: 'get',
    params: obj
  })
}

export function putRatioObj1(obj) {
  return request({
    url: '/admin/user/updateRat',
    method: 'get',
    params: obj
  })
}

export function fetchRegularRuleListNew1(query) {
  return request({
    url: '/admin/user/pageFixHistory',
    method: 'get',
    params: query
  })
}

export function fetchBusinessRuleListNew1(query) {
  return request({
    url: '/admin/user/pageBusHistory',
    method: 'get',
    params: query
  })
}

export function getStop1(id) {
  return request({
    url: '/admin/user/fixGetStop/' + id,
    method: 'get'
  })
}

export function getUse1(id) {
  return request({
    url: '/admin/user/fixGetUse/' + id,
    method: 'get'
  })
}

export function getStopNew1(id) {
  return request({
    url: '/admin/user/busGetStop/' + id,
    method: 'get'
  })
}

export function getUseNew1(id) {
  return request({
    url: '/admin/user/busGetUse/' + id,
    method: 'get'
  })
}

